<template>
  <div class="box1">
    <div class="box">
      <div class="head">
        <div>
          <BreadcrumbVue></BreadcrumbVue>
        </div>
        <div v-show="obj.flag">
          <p class="p3">{{ obj.price }}</p>
          <button class="btn1" v-show="obj.btn1" @click="fun">
            {{ obj.name }}
          </button>
          <button class="btn1" v-show="obj.btn2" @click="$emit('TopUp')">
            {{ obj.name1 }}
          </button>
        </div>
      </div>

      <div class="content">
        <slot></slot>
      </div>
    </div>
  </div>
</template>

<script setup>
import BreadcrumbVue from "./Breadcrumb .vue";
import { useRouter } from "vue-router";
const router = useRouter();

defineProps({
  obj: {
    default: {
      flag: true,
      name: "充值",
      price: "钱包余额:1569.00",
      btn1: true,
      btn2: false,
      name1: "新增",
    },
  },
});
defineEmits(["TopUp"]);

function fun() {
  router.push("/Recharge/admin");
  // console.log(11);
}
</script>

<style lang="less" scoped>
.box1 {
  height: 100%;
  width: 100%;
  background-color: #f7f8fd;
  overflow: auto;
}

.box {
  height: 40vh;
  background-color: #5e72e4;

  .head {
    display: flex;
    justify-content: space-between;
    color: #fff;
    width: 85%;
    margin: 0 auto;
    padding: 20px 0 0;

    div {
      display: flex;
      align-items: center;

      .p1 {
        font-weight: 600;
        margin-right: 32px;
      }

      .p2 {
        font-size: 14px;
      }

      .p3 {
        font-size: 20px;
        font-weight: 600;
        margin-right: 32px;
      }

      .btn1 {
        width: 78px;
      }
    }
  }

  .content {
    width: 90%;
    height: 75vh;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    margin-top: 10px;
    background-color: rgba(255, 255, 255, 1);
    overflow-y: auto;
    padding: 20px;
    overflow-x: hidden;
  }
}
</style>
